In recent years, there has been increasing interest in dynamic binary translation and runtime optimization. Dynamic binary translation and optimization is a technique that translates and optimizes binary code at runtime for compatibility and performance improvement. The basic idea is to identify the most frequently executed code of a program as a hot trace and optimize the hot trace code based on runtime profiling information.
Typically, a dynamic optimizer monitors a program execution, identifies hot traces within the program, and performs optimizations of these hot traces. The optimized hot traces may be placed in an instruction cache so that subsequent executions of hot traces may be run in their optimized forms from the instruction cache. The performance results of a runtime optimized program depend greatly on the hot trace selection techniques.